package com.mybatistest.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "Result对象", description = "返回的数据对象")
public class Result {

    @ApiModelProperty(value = "姓名", required = true, example = "root")
    @NotBlank(message = "姓名不能为空")
    private String name;

    @ApiModelProperty(value = "年龄", required = true, example = "18")
    @NotNull(message = "年龄不能为空")
    private int age;

    @ApiModelProperty(value = "身份证号", required = true, example = "123456789")
    @NotBlank(message = "身份证号不能为空")
    private String citizen;
}
